home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / timetest.zip / TIMETEST.DOC < prev    next >
Text File  |  1992-01-20  |  1KB  |  41 lines

  1.  
  2.  
  3.     I give this program and source code to the Public Domain.
  4.     
  5.  
  6.          Welcome to the wonderful world of little utilities.
  7.     The one you are checking out now is a little thing I whipped
  8.     up so that I could have operating hours for the doors on my
  9.     BBS.  Basically what it does is this; given two times, it
  10.     will return a DOS error level depending on whether the
  11.     current system time is between the two specified or not
  12.     between.  You must give it the time in the 24 hour format
  13.     with a colon (:) separating the hours and minutes.  The
  14.     intended use is for batch files.  Here is an example:
  15.  
  16.             @ECHO OFF
  17.             TIMETEST 13:30 21:00
  18.             IF ERRORLEVEL 2 GOTO END
  19.             IF ERRORLEVEL 1 GOTO BAD
  20.             IF ERRORLEVEL 0 GOTO OK
  21.             :OK
  22.             ECHO It is between.
  23.             GOTO END
  24.             :BAD
  25.             ECHO It is not between.
  26.             :END
  27.  
  28.     You could replace the times in the above file with %1 and %2
  29.     so you can pass the times to the batch file.  If the second
  30.     time passed is less that the first it assumes an "overnight"
  31.     time period.
  32.  
  33.          Well, I've rambled on enough.  This is a simple thing
  34.     and the source is included so you can play with it.
  35.  
  36.     Joseph J Klemmer
  37.     ================
  38.          My UnKnown BBS
  39.          (703)780-6890
  40.          Alexandria, VA
  41.